CREATE TABLE [dbo].[T_CUSTOMER_MEDICAL_FILE]
(
[CUSTOMER_ID] [bigint] NOT NULL,
[MEDICAL_FILE_ID] [bigint] NOT NULL,
[CUSTOMER_MEDICAL_FILE_STATUS] [bit] NOT NULL,
[CREATE_DATE] [datetime] NOT NULL,
[DISABLE_DATE] [datetime] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[T_CUSTOMER_MEDICAL_FILE] ADD CONSTRAINT [PK__T_CUSTOM__ED847C69BC7F97AF] PRIMARY KEY CLUSTERED  ([CUSTOMER_ID], [MEDICAL_FILE_ID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[T_CUSTOMER_MEDICAL_FILE] ADD CONSTRAINT [FK__T_CUSTOME__CUSTO__1F98B2C1] FOREIGN KEY ([CUSTOMER_ID]) REFERENCES [dbo].[T_CUSTOMER] ([CUSTOMER_ID])
GO
ALTER TABLE [dbo].[T_CUSTOMER_MEDICAL_FILE] ADD CONSTRAINT [FK__T_CUSTOME__MEDIC__208CD6FA] FOREIGN KEY ([MEDICAL_FILE_ID]) REFERENCES [dbo].[T_MEDICAL_FILE] ([MEDICAL_FILE_ID])
GO
